#include "javablockcomment.h"

JavaBlockComment::JavaBlockComment(const int &indentation) :
        _indentation(indentation)
{
}

QString JavaBlockComment::text()
{
    return QString("%1/*%2\n%3*/\n").arg(this->tabulators()).arg(this->_text).arg(this->tabulators());
}

void JavaBlockComment::appendLine(const QString &line)
{
    this->_text.append("\n");
    this->_text.append(QString("%1%2").arg(this->tabulators()).arg(line));
}

QString JavaBlockComment::tabulators()
{
    QString indentation = "";
    for (int i = 0; i < this->_indentation; i++) {
        indentation += "\t";
    }

    return indentation;
}
